/*
 * @Author: your name
 * @Date: 2021-01-26 11:07:26
 * @LastEditTime: 2021-01-27 18:09:50
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \tlwok-front-purchase-platfrom\src\router\admin.js
 */
import LayoutBase from '@/layouts/LayoutBase';

export default [
  {
    path: '/admin',
    component: LayoutBase,
    meta: {
      title: '天章集团采购中台',
      isLogin: true,
    },
    children: [ // 带菜单的放在这下面
      {
        path: '/admin',
        component: () => import(/* webpackChunkName: "admin" */'@/pages/admin/index'),
        redirect: 'purchase/statistics',
        children: [ // 带菜单的放在这下面
          {
            path: 'purchase/statistics',
            component: () => import(/* webpackChunkName: "admin" */'@/pages/admin/purchase/statistics'),
            meta: {
              noBack: true,
            },
          },
          {
            path: 'purchase/offline',
            component: () => import(/* webpackChunkName: "admin/purchase/offline/index" */'@/pages/admin/purchase/offline/index'),
            meta: {
              noBack: true,
            },
          },
          {
            path: 'purchase/online',
            component: () => import(/* webpackChunkName: "admin/purchase/online/index" */'@/pages/admin/purchase/online/index'),
            meta: {
              noBack: true,
            },
          },
          {
            path: 'purchase/supplier',
            component: () => import(/* webpackChunkName: "admin/purchase/supplier" */'@/pages/admin/purchase/supplier'),
            meta: {
              noBack: true,
            },
          },
          {
            path: 'purchase/goods',
            component: () => import(/* webpackChunkName: "admin/purchase/goods" */'@/pages/admin/purchase/goods'),
            meta: {
              noBack: true,
            },
          },
        ],
      },
      // 不带菜单的放这下面
      {
        path: 'purchase/offline/detail/:id',
        component: () => import('@/pages/purchase/offline/detail'),
        meta: {
          title: '线下采购单详情',
        },
      },
      {
        path: 'purchase/online/detail/:id',
        component: () => import('@/pages/purchase/online/detail'),
        meta: {
          title: '线上采购单详情',
        },
      },
      {
        path: 'settingsMenu/purchaserAccess',
        component: () => import('@/pages/admin/settingsMenu/purchaserAccess'),
        meta: {
          title: '采购商权限',
        },
      },
      {
        path: 'settingsMenu/accountAccess',
        component: () => import('@/pages/admin/settingsMenu/accountAccess'),
        meta: {
          title: '账户权限',
        },
      },
      {
        path: 'settingsMenu/adsTools',
        component: () => import('@/pages/admin/settingsMenu/adsTools'),
        meta: {
          title: '广告设置',
        },
      },
    ],

  },
  {
    path: '/admin/login',
    component: () => import(/* webpackChunkName: "admin" */'@/pages/admin/login'),
  },
]
;
